namespace Architecture.CrossCutting.LoggingEntities.Migrations
{
    using System;
    using System.Data.Entity.Migrations;
    
    public partial class UpdatewcfServiceLog : DbMigration
    {
        public override void Up()
        {
            CreateTable(
                "dbo.WcfServiceLogs",
                c => new
                    {
                        Id = c.Guid(nullable: false),
                        Step = c.Int(nullable: false),
                        OperationName = c.String(),
                        Action = c.String(),
                        PipeLineStarted = c.DateTime(nullable: false),
                        PipeLineEnded = c.DateTime(nullable: false),
                        PipeLineDuration = c.Long(nullable: false),
                        SerializationDuration = c.Long(nullable: false),
                        OperationStarted = c.DateTime(),
                        OperationEnded = c.DateTime(),
                        OperationDuration = c.Long(nullable: false),
                        RequestLength = c.Long(nullable: false),
                        ResponseLength = c.Long(nullable: false),
                        IsFault = c.Boolean(nullable: false),
                        CorrelationId = c.Guid(nullable: false),
                        Level = c.Int(nullable: false),
                        Created = c.DateTime(nullable: false),
                        ThreadId = c.Int(nullable: false),
                        ProcessId = c.Int(nullable: false),
                        ServerName = c.String(),
                        ServerIp = c.String(),
                        ThreadIdentity = c.String(),
                        WindowsIdentity = c.String(),
                    })
                .PrimaryKey(t => t.Id);
            
        }
        
        public override void Down()
        {
            DropTable("dbo.WcfServiceLogs");
        }
    }
}
